package com.ctyon.watchmanager.model.net.api;

import com.ctyon.netlibrary.net.revert.BaseResponseEntity;
import com.ctyon.netlibrary.net.revert.BaseResponseEntity2;
import com.ctyon.watchmanager.model.net.entity.Manager;
import com.ctyon.watchmanager.model.net.entity.SmsNotification;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * CreateDate：19-4-12 on 下午2:51
 * Describe:
 * Coder: lee
 */
public interface Api {

    // =========================================== account ===================================================
    @GET("account/getCode")
    Observable<BaseResponseEntity> getCode(@Query("phoneNumber") String phoneNumber);

    @GET("account/findPasswordGetCode")
    Observable<BaseResponseEntity> findPasswordGetCode(@Query("phoneNumber") String phoneNumber);

    @POST("account/register")
    Observable<BaseResponseEntity> register(@Query("phoneNumber") String phoneNumber, @Query("password") String password, @Query("code") String code);

    @POST("account/register")
    Observable<BaseResponseEntity> findPassword(@Query("phoneNumber") String phoneNumber, @Query("password") String password, @Query("code") String code);

    @POST("account/login")
    Observable<BaseResponseEntity> login(@Query("phoneNumber") String phoneNumber, @Query("password") String password);

    @POST("account/getChatRecord")
    Observable<BaseResponseEntity> getChatRecord(@Query("watchId") String watchId, @Query("time") Long time);

    @POST("account/getImg")
    Observable<BaseResponseEntity> getImg(@Query("watchId") String watchId);

    @POST("account/delImg")
    Observable<BaseResponseEntity> delImg(@Query("watchId") String watchId, @Query("sendTime") String sendTime);



    // =========================================== manager ===================================================
    @POST("manager/addWatch")
    Observable<BaseResponseEntity> addWatch(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("nick") String nick);

    @POST("manager/removeWatch")
    Observable<BaseResponseEntity> removeWatch(@Query("managerId") Long managerId, @Query("watchId") String watchId);

    @POST("manager/getWatchList")
    Observable<BaseResponseEntity> getWatchList(@Query("managerId") Long managerId);

    @POST("manager/updateOss")
    Observable<BaseResponseEntity> checkUpdate(@Query("managerId") Long managerId, @Query("version") String version);

    @POST("manager/updateNick")
    Observable<BaseResponseEntity> updateNick(@Query("managerId") Long managerId,  @Query("nick") String nick);

    @POST("manager/updatePassWord")
    Observable<BaseResponseEntity> updatePassWord(@Query("managerId") Long managerId, @Query("oldPassword") String oldPassword, @Query("newPassWord") String newPassWord);

    @POST("manager/getAllLocation")
    Observable<BaseResponseEntity> getAllLocation(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("time") Long time);


    @POST("set/status")
    Observable<BaseResponseEntity> smsNotification(@Query("setstatus") String setstatus);

    @GET("set/Selectstatus")
    Observable<SmsNotification> getSmsNotification(@Query("manager_id") String manager_id, @Query("watch_id") String watch_id);


    // =========================================== CMD ===================================================
    @POST("cmd/interval")
    Observable<BaseResponseEntity> setInterval(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("interval") Long interval);

    @POST("cmd/voiceProtect")
    Observable<BaseResponseEntity> voiceProtect(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("phoneNumber") String phoneNumber);

    @POST("cmd/sosNumber")
    Observable<BaseResponseEntity> sosNumber(@Query("managerId") Long managerId, @Query("watchId") String watchId,
                                             @Query("sos1") String sos1, @Query("sos2") String sos2, @Query("sos3") String sos3);

    @POST("cmd/sosConfig")
    Observable<BaseResponseEntity> sosConfig(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("config") boolean config);

    @POST("cmd/lowBatConfig")
    Observable<BaseResponseEntity> lowBatConfig(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("config") boolean config);

    @POST("cmd/locationNow")
    Observable<BaseResponseEntity> locationNow(@Query("managerId") Long managerId, @Query("watchId") String watchId);

    @POST("cmd/powerOff")
    Observable<BaseResponseEntity> powerOff(@Query("managerId") Long managerId, @Query("watchId") String watchId);

    @POST("cmd/reboot")
    Observable<BaseResponseEntity> reboot(@Query("managerId") Long managerId, @Query("watchId") String watchId);

    @POST("cmd/noDisturb")
    Observable<BaseResponseEntity> noDisturb(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("intervals") String intervals);

    @POST("cmd/findWatch")
    Observable<BaseResponseEntity> findWatch(@Query("managerId") Long managerId, @Query("watchId") String watchId);

    @POST("cmd/alarm")
    Observable<BaseResponseEntity> alarm(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("alarms") String alarms);

    @POST("cmd/contacts")
    Observable<BaseResponseEntity> contacts(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("contacts") String contacts);

    @POST("cmd/takePicture")
    Observable<BaseResponseEntity> takePicture(@Query("managerId") Long managerId, @Query("watchId") String watchId);

    @POST("cmd/checkMoney")
    Observable<BaseResponseEntity> checkMoney(@Query("managerId") Long managerId, @Query("watchId") String watchId);

    @POST("cmd/checkData")
    Observable<BaseResponseEntity> checkData(@Query("managerId") Long managerId, @Query("watchId") String watchId);

    @POST("cmd/flower")
    Observable<BaseResponseEntity> flower(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("counts") Integer contacts);

    @POST("cmd/notify")
    Observable<BaseResponseEntity> notify(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("text") String text);

    @POST("cmd/phoneCall")
    Observable<BaseResponseEntity> phoneCall(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("phoneNumber") String phoneNumber);

    @POST("cmd/stepConfig")
    Observable<BaseResponseEntity> stepConfig(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("config") boolean config);

    @POST("cmd/stepIntervals")
    Observable<BaseResponseEntity> stepIntervals(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("intervals") String intervals);

    @POST("cmd/scene")
    Observable<BaseResponseEntity> scene(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("model") Integer model);

    @POST("cmd/language")
    Observable<BaseResponseEntity> language(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("language") Integer language, @Query("timezone") Integer timezone);

    @POST("cmd/uploadConfig")
    Observable<BaseResponseEntity> uploadConfig(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("uploadConfig") String uploadConfig);

    @POST("cmd/program")
    Observable<BaseResponseEntity> program(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("program") String program);

    @POST("cmd/video")
    Observable<BaseResponseEntity> video(@Query("managerId") Long managerId, @Query("watchId") String watchId, @Query("videoId") String videoId);


}
